#json-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.json-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background-color: rgba(0, 0, 0, 0.6);*/
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px;
    box-sizing: border-box;
}

.json-preview-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 1000px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-left: 20px;
    margin-top: 20px;
}

.json-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.json-preview-header h3 {
    margin: 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.header-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.close-btn, .copy-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-btn:hover, .copy-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.close-btn {
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.json-preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-tabs {
    display: flex;
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    color: #666;
    font-size: 13px;
}

.tab-btn.active {
    color: #007cba;
    border-bottom-color: #007cba;
    background: white;
}

.tab-btn:hover:not(.active) {
    background: #f0f0f0;
    color: #333;
}

.tab-content {
    flex: 1;
    overflow: auto;
    position: relative;
}

.tab-pane {
    display: none;
    padding: 0;
    height: 100%;
    overflow: auto;
}

.tab-pane.active {
    display: block;
}

.json-formatted-display {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.json-code {
    margin: 0;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    background: #f8f9fa;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #333;
    flex: 1;
    overflow: auto;
}

/* 部分JSON状态指示 */
.partial-status {
    font-size: 11px;
    padding: 8px 16px;
    margin: 0;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
}

.partial-status.complete {
    background: #e6f4ea;
    color: #137333;
}

.partial-status.partial {
    background: #fef7e0;
    color: #f9ab00;
}

/* JSON语法高亮 */
.json-key {
    color: #881391;
    font-weight: 600;
}

.json-string {
    color: #c41a16;
}

.json-number {
    color: #1c00cf;
}

.json-boolean {
    color: #0d22aa;
    font-weight: 600;
}

.json-bracket {
    color: #000;
    font-weight: bold;
}

.json-colon {
    color: #000;
}

/* 数据状态指示器 */
.data-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
    font-weight: 500;
}

.data-status.complete {
    background: #e6f4ea;
    color: #137333;
}

.data-status.partial {
    background: #fef7e0;
    color: #f9ab00;
}

.data-status.unknown {
    background: #f1f3f4;
    color: #5f6368;
}

/* 滚动条样式 */
.tab-content::-webkit-scrollbar,
.json-code::-webkit-scrollbar {
    width: 6px;
}

.tab-content::-webkit-scrollbar-track,
.json-code::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.tab-content::-webkit-scrollbar-thumb,
.json-code::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb:hover,
.json-code::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式调整 */
@media (max-height: 700px) {
    .json-preview-container {
        max-height: 90vh;
        margin-top: 10px;
    }

    .json-code {
        padding: 12px;
        font-size: 12px;
    }
}